package com.aspose.cells;

class zas implements zafn {
   private zif b;
   private Color c;
   private zvi d;
   private Color e;
   private int f;
   private boolean g;
   boolean a;
   private boolean h = false;

   zas(zif var1) {
      this.b = var1;
      this.e = Color.getWhite();
      this.c = Color.getWhite();
      this.g = false;
      this.a = true;
      this.f = 1;
      this.d = new zvi(this);
   }

   public boolean a() {
      return this.g;
   }

   public void a(boolean var1) {
      this.g = var1;
      this.a = false;
   }

   public Color b() {
      return this.f == 0 ? Color.getEmpty() : this.c;
   }

   public void a(Color var1) {
      this.c = var1;
   }

   zvi c() {
      return this.d;
   }

   public zagr d() {
      return this.d;
   }

   public Color e() {
      return this.f == 0 ? Color.getEmpty() : this.e;
   }

   public void b(Color var1) {
      this.e = var1;
   }

   void c(Color var1) {
      if (this.f == 1) {
         this.b(var1);
      }

   }

   boolean f() {
      return this.f == 3 || this.f == 5 || this.f == 4;
   }

   boolean g() {
      if (this.f()) {
         return false;
      } else if (this.f == 0) {
         return true;
      } else {
         return (this.e.getA() & 255) <= 250;
      }
   }

   public int h() {
      return this.f;
   }

   public void a(int var1) {
      this.f = var1;
   }

   public boolean a(zas var1) throws Exception {
      if (!this.f() && !var1.f()) {
         if (this.h() != var1.h()) {
            return false;
         } else if (!this.b().equals(var1.b())) {
            return false;
         } else {
            return this.e().equals(var1.e());
         }
      } else if (this.f() != var1.f()) {
         return false;
      } else {
         return this.c().a(var1.c());
      }
   }

   protected void finalize() throws Exception {
      this.b(false);
   }

   public void i() {
      this.b(true);
      com.aspose.cells.b.a.zg.a(this);
   }

   protected void b(boolean var1) {
      if (!this.h) {
         if (var1 && this.d != null) {
            this.d.g();
         }

         this.h = true;
      }

   }
}
